package com.zuihai.app.mvp.ui.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.jess.arms.base.BaseHolder;
import com.jess.arms.base.DefaultAdapter;
import com.zuihai.app.mvp.model.entity.User;
import com.zuihai.app.mvp.ui.holder.UserItemHolder;

import java.util.List;

import com.zuihai.app.R;

/**
 * Created by jess on 9/4/16 12:57
 * Contact with jess.yan.effort@gmail.com
 */
public class UserAdapter extends DefaultAdapter<User> {
    private Context context;

    public UserAdapter(Context context, List<User> infos) {
        super(infos);
        this.context = context;
    }

    @Override
    public BaseHolder<User> getHolder(ViewGroup parent, int viewType) {
        View itemView = LayoutInflater.from(context).inflate(R.layout.recycle_list, null, false);
        return new UserItemHolder(itemView);
    }
}
